{"ast":null,"code":"import CaretDownFilled from \"@ant-design/icons/es/icons/CaretDownFilled\";\nimport FileOutlined from \"@ant-design/icons/es/icons/FileOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport MinusSquareOutlined from \"@ant-design/icons/es/icons/MinusSquareOutlined\";\nimport PlusSquareOutlined from \"@ant-design/icons/es/icons/PlusSquareOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { cloneElement, isValidElement } from '../../_util/reactNode';\nexport default function renderSwitcherIcon(prefixCls, switcherIcon, showLine, treeNodeProps) {\n  var isLeaf = treeNodeProps.isLeaf,\n    expanded = treeNodeProps.expanded,\n    loading = treeNodeProps.loading;\n  if (loading) {\n    return /*#__PURE__*/React.createElement(LoadingOutlined, {\n      className: \"\".concat(prefixCls, \"-switcher-loading-icon\")\n    });\n  }\n  var showLeafIcon;\n  if (showLine && typeof showLine === 'object') {\n    showLeafIcon = showLine.showLeafIcon;\n  }\n  if (isLeaf) {\n    if (!showLine) {\n      return null;\n    }\n    if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {\n      var leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;\n      var leafCls = \"\".concat(prefixCls, \"-switcher-line-custom-icon\");\n      if (isValidElement(leafIcon)) {\n        return cloneElement(leafIcon, {\n          className: classNames(leafIcon.props.className || '', leafCls)\n        });\n      }\n      return leafIcon;\n    }\n    return showLeafIcon ? /*#__PURE__*/React.createElement(FileOutlined, {\n      className: \"\".concat(prefixCls, \"-switcher-line-icon\")\n    }) : /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-switcher-leaf-line\")\n    });\n  }\n  var switcherCls = \"\".concat(prefixCls, \"-switcher-icon\");\n  var switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;\n  if (isValidElement(switcher)) {\n    return cloneElement(switcher, {\n      className: classNames(switcher.props.className || '', switcherCls)\n    });\n  }\n  if (switcher) {\n    return switcher;\n  }\n  if (showLine) {\n    return expanded ? /*#__PURE__*/React.createElement(MinusSquareOutlined, {\n      className: \"\".concat(prefixCls, \"-switcher-line-icon\")\n    }) : /*#__PURE__*/React.createElement(PlusSquareOutlined, {\n      className: \"\".concat(prefixCls, \"-switcher-line-icon\")\n    });\n  }\n  return /*#__PURE__*/React.createElement(CaretDownFilled, {\n    className: switcherCls\n  });\n}","map":{"version":3,"names":["CaretDownFilled","FileOutlined","LoadingOutlined","MinusSquareOutlined","PlusSquareOutlined","classNames","React","cloneElement","isValidElement","renderSwitcherIcon","prefixCls","switcherIcon","showLine","treeNodeProps","isLeaf","expanded","loading","createElement","className","showLeafIcon","leafIcon","leafCls","props","switcherCls","switcher"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/tree/utils/iconUtil.js"],"sourcesContent":["import CaretDownFilled from \"@ant-design/icons/es/icons/CaretDownFilled\";\nimport FileOutlined from \"@ant-design/icons/es/icons/FileOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport MinusSquareOutlined from \"@ant-design/icons/es/icons/MinusSquareOutlined\";\nimport PlusSquareOutlined from \"@ant-design/icons/es/icons/PlusSquareOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { cloneElement, isValidElement } from '../../_util/reactNode';\nexport default function renderSwitcherIcon(prefixCls, switcherIcon, showLine, treeNodeProps) {\n  const {\n    isLeaf,\n    expanded,\n    loading\n  } = treeNodeProps;\n  if (loading) {\n    return /*#__PURE__*/React.createElement(LoadingOutlined, {\n      className: `${prefixCls}-switcher-loading-icon`\n    });\n  }\n  let showLeafIcon;\n  if (showLine && typeof showLine === 'object') {\n    showLeafIcon = showLine.showLeafIcon;\n  }\n  if (isLeaf) {\n    if (!showLine) {\n      return null;\n    }\n    if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {\n      const leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;\n      const leafCls = `${prefixCls}-switcher-line-custom-icon`;\n      if (isValidElement(leafIcon)) {\n        return cloneElement(leafIcon, {\n          className: classNames(leafIcon.props.className || '', leafCls)\n        });\n      }\n      return leafIcon;\n    }\n    return showLeafIcon ? /*#__PURE__*/React.createElement(FileOutlined, {\n      className: `${prefixCls}-switcher-line-icon`\n    }) : /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-switcher-leaf-line`\n    });\n  }\n  const switcherCls = `${prefixCls}-switcher-icon`;\n  const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;\n  if (isValidElement(switcher)) {\n    return cloneElement(switcher, {\n      className: classNames(switcher.props.className || '', switcherCls)\n    });\n  }\n  if (switcher) {\n    return switcher;\n  }\n  if (showLine) {\n    return expanded ? /*#__PURE__*/React.createElement(MinusSquareOutlined, {\n      className: `${prefixCls}-switcher-line-icon`\n    }) : /*#__PURE__*/React.createElement(PlusSquareOutlined, {\n      className: `${prefixCls}-switcher-line-icon`\n    });\n  }\n  return /*#__PURE__*/React.createElement(CaretDownFilled, {\n    className: switcherCls\n  });\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,4CAA4C;AACxE,OAAOC,YAAY,MAAM,yCAAyC;AAClE,OAAOC,eAAe,MAAM,4CAA4C;AACxE,OAAOC,mBAAmB,MAAM,gDAAgD;AAChF,OAAOC,kBAAkB,MAAM,+CAA+C;AAC9E,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,YAAY,EAAEC,cAAc,QAAQ,uBAAuB;AACpE,eAAe,SAASC,kBAAkB,CAACC,SAAS,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,aAAa,EAAE;EAC3F,IACEC,MAAM,GAGJD,aAAa,CAHfC,MAAM;IACNC,QAAQ,GAENF,aAAa,CAFfE,QAAQ;IACRC,OAAO,GACLH,aAAa,CADfG,OAAO;EAET,IAAIA,O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